<include file="Public/qt_header" title="{$list.nickname}_官方APP下载" keywords="{$list.nickname}APP,{$list.nickname}下载,{$list.nickname}破解版,{$list.nickname}官网" description="{$list.beifen}"/>
<!--=== Breadcrumbs ===-->
<div class="row-fluid breadcrumbs margin-bottom-20">
    <div class="container">
        <h1 class="pull-left">{$list.nickname}</h1>
        <ul class="pull-right breadcrumb">
            <li>大小：{$list.zsize|formatBytes}</li>
            <li>{$list.create_time|date='Y-m-d',###}</li>
        </ul>
    </div><!--/container-->
</div><!--/breadcrumbs-->

<script type="text/javascript" src="__STATIC__/wap/jquery-1.7.2.min.js"></script>
<script type="text/javascript" src="__STATIC__/js/bootstrap.min.js"></script>

<style>
.sky-form section {
    margin-bottom: 20px;
}
.tabbb_box input{height: 34px;border:none;border-bottom: 1px solid #e5e5e5;padding:0; font-size: 16px;}
.modal-footer{border-top: none;width: 100%;padding:3px;font-size: 22px; margin-bottom: 15px;padding: 0 20px;}
.modal-footer a{display: block;background-color: #268df7;text-align: center;color: #fff;border-radius: 28px;}
#sendcode88{border-radius: 18px;float: right;}
.form-group .font16{font-weight: bold;}
h4.modal-title{font-weight: bold;}
.font16{font-size: 16px;}
.modal.fade .modal-dialog{transform: translate(0,0)}
</style>
<script language="javascript">
function isWeiXin(){
	var ua = navigator.userAgent.toLowerCase();
	if(ua.match(/MicroMessenger/i)=="micromessenger") {
		return true;
	} else {
		return false;
	}
}
window.onload =(function(){
    $("#ase").click(function(){
        gotoopenurl('{:U('Index/down',array('id'=>$list['id']))}');
        setTimeout(function(){  //使用  setTimeout（）方法设定定时2000<a href="https://www.baidu.com/s?wd=%E6%AF%AB%E7%A7%92&tn=44039180_cpr&fenlei=mv6quAkxTZn0IZRqIHckPjm4nH00T1YLn1R1PW6dPH6YPAnsPW6v0ZwV5Hcvrjm3rH6sPfKWUMw85HfYnjn4nH6sgvPsT6KdThsqpZwYTjCEQLGCpyw9Uz4Bmy-bIi4WUvYETgN-TLwGUv3EnHf4PWmsrHRdnWckPWnkrHmkrf" target="_blank" class="baidu-highlight">毫秒</a>
            gotoopenurl('{:U('Appipa/downloading',array('id'=>$list['id']))}');
        },2000);
    });
//   $("#ase").trigger("click");
    //  gotoopenurl('{:U('Index/down',array('id'=>$list['id']))}');
});
function gotoopenurl(url){
	if(isWeiXin()){
		alert("请点击微信右上角按钮，然后在弹出的菜单中，点击在浏览器中打开，即可安装");
	}else{
		<if condition="($userid neq '0') OR ($ispayed eq 1)">
			window.location.href = url;
		<else />
			$('#modifyphone').modal('show');
		</if>
		
	}
}
</script>
<if condition="($list.aqpassword eq '') OR ($list.aqpassword eq $aqpassword)">
	<div id="" class="view row" style="margin-top:30px;">
	    <div class="span12 margin-bottom-20" style="text-align:center;">
            <if condition="$list.zxlogo neq '' ">
                <img src="__IMG__{$list.zxlogo}" class="img-rounded" width="119" height="118" />
            <else />
                <img src="../Public/icon/dafuapk.png" class="img-rounded" width="119" height="118" />
            </if>
	       
	        <div class="spinner" style="padding-top:20px;" redata="{$list.needmoney}">
	        <div id="showtext"></div>
	        <div class="loading"></div>
				<switch name="ispayed">
					<case value="0">
						<a onclick="gotoopenurl('{$gopayurl}')" class="btn-u btn-u-lg"><i class="fa fa-download"></i> 购买￥{$list.needmoney}元</a>
					</case>
					<default />
						<span id="checkinfo">
							<if condition="$list.ext eq 'ipa'">
								<a onclick="gotoopenurl('{:U('Index/down',array('id'=>$list['id']))}')"  id="ase"  class="btn-u btn-u-lg"><i class="fa fa-download"></i> 点击安装</a>
							<elseif condition="($list.ext eq 'apk') and ($uptype eq '1')"/>

								<a onclick="gotoopenurl('{:U('Index/down',array('id'=>$list['id']))}')"  id="ase"  class="btn-u btn-u-lg"><i class="fa fa-download"></i> 点击安装</a>
							<elseif condition="($list.ext eq 'apk') and ($uptype eq '2')"/>
									<a onclick="gotoopenurl('{:U('Index/down',array('id'=>$list['id']))}')"  id="ase"  class="btn-u btn-u-lg"><i class="fa fa-download"></i> 点击安装</a>

							</if>
                                       <!--<if condition="$list.ext eq 'ipa'">-->
                                      <!--<a onclick="gotoopenurl('{:U('Index/down',array('id'=>$list['id']))}')" id="ase" class="btn-u btn-u-lg" ><i class="fa fa-download"></i> 点击安装</a>-->
                                           <!--&lt;!&ndash;<a  onclick="gotoopenurl('{:U('Appipa/downloading',array('id'=>$list['id']))}')" class="btn-u btn-u-lg"><i class="fa fa-download"></i> 点击安装</a>&ndash;&gt;-->
							<!--<elseif condition="($list.ext eq 'apk') and ($uptype eq '1')"/>-->

								<!--<a onclick="gotoopenurl('{:U('Appipa/downloading',array('id'=>$list['id']))}')" class="btn-u btn-u-lg"><i class="fa fa-download"></i> 点击安装</a>-->
							<!--<elseif condition="($list.ext eq 'apk') and ($uptype eq '2')"/>-->
									<!--<a onclick="gotoopenurl('{:U('Appipa/downloading',array('id'=>$list['id']))}')" class="btn-u btn-u-lg"><i class="fa fa-download"></i> 点击安装</a>-->
							</if>
						</span>

				</switch>

				
	        </div>
	    </div>
	    <div class="span12" style="text-align:center;padding-top:20px;">
	<!---->
			<if condition="$list.ext eq 'ipa' ">
				<span class="label label-info">适用于iOS设备</span>
				<span class="label label-danger">苹果</span>
			<else />
				<span class="label label-info">适用于Android设备</span>
				<span class="label label-danger">安卓</span>
			</if>
	    	
	        
	<!---->
	    </div>
	</div>
<else />
	<div id="" class="view row" style="margin-top:30px;">    
	    <div class="span12 margin-bottom-20" style="text-align:center;">
	    <img src="../Public/icon/dafuapk.png" class="img-rounded" width="119" height="118" />
	        <div class="spinner" style="padding-top:20px; margin-bottom:150px;">
	        	<div id="showtext"></div>
	        	<div class="loading"></div>
	        	<form method="post" id="form" action="{:U('Appipa/checkpass')}">
		        	<h2>请输入密码</h2>
		            <h4>该应用设置了安装密码,请输入密码继续</h4>
		            <input type="hidden" name="checkid" value="{$list.id}">
	                <input type="password" id="aqpassword" name="aqpassword" style="width:270px;"><br><br>
	                <button type="submit" id="submitButton" class="btn-u btn-u-green">立刻进入</button>
	            </form>
	        </div>
	    </div>
	</div>
</if>
<!---->
    <hr class="devider devider-dotted">
    <div id="" class="view row margin-bottom-30">    
        <div class="span12" style="text-align:center;">或者用手机扫描下面的二维码安装<br><br>
            <img src="__PUBLIC__/png/{$qrcode}.png" width="117" height="116" />
        </div>
    </div>
<!---->
<if condition="$list.beifen neq '' ">
	<div style="margin:0px auto;padding:0px auto; width:65%; margin-bottom:30px;">
		<div style=" border:1px solid #efefef; background-color:#fafafa; padding:25px;">
			<h1>应用介绍</h1>
			<p style="word-break:break-all;">
				{$list.beifen}
			</p>
		</div>
	</div>
</if>

<!-- 登录 -->
<!-- Modal -->
<div class="modal fade top100" id="modifyphone" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
  <div class="modal-dialog">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
        <h4 class="modal-title" id="myModalLabel">手机登录</h4>
      </div>
      <div class="modal-body">
			<div class="tabbb_box">
				<form action="{:U('Login/loginphone')}" method="post" id="myphoneform" class="reg-page sky-form">
                <!-- <div class="row"> -->
                <div class="form-group">
                    <div class="font16">手机号</div>
                        <input type="text" id="phone" name="phone" value="" placeholder="请输入您的手机号" style="width:100%;">
                </div>
                <div class="form-group row">
                     <div class="font16">验证码</div>
                        <input  type="text" id="checkcode88" name="checkcode88" placeholder="请输入验证码" class="col-md-7 col-xs-7">

					    <button class="btn-u col-md-4 col-xs-4" type="button" id="sendcode88" onclick="sendcode8899()">发送验证码</button>

                </div>
				<div style="clear:both;"></div>
                <!-- </div> -->
				</form>
			</div>
		</div>

		  <div class="modal-footer">
			<!-- <button type="button" class="page btn-u" data-dismiss="modal" onclick="xiugaiphone()">登录</button> -->
            <a href="javascript:;" class="page" data-dismiss="modal" onclick="xiugaiphone()">登录</a>
		  </div>

    </div>
  </div>
</div>

<script language="javascript">
function xiugaiphone(){
	$('#myphoneform').submit();
}
var countdown=60; 
function settime() { 
	if (countdown == 0) { 
		$("#sendcode88").attr("disabled",false);
		$("#sendcode88").html("发送验证码");
		countdown = 60; 
		return;
	} else { 
		$("#sendcode88").attr("disabled",true);
		$("#sendcode88").html("重新发送(" + countdown + ")");
		countdown--; 
	} 
	setTimeout(function() { 
	settime() }
	,1000) 
}

function sendcode8899(){
	$("#sendcode88").attr("disabled",true);
	var phone = $('#phone').val();
	
	if(phone){
		$.ajax({
			url: '/index.php/login/sendemailcode88',
			type: 'post',
			data: {phone : phone},
			dataType: 'json',
			beforeSend: function() {
			},
			complete: function() {
				
			},
			success: function(json) {
				
				if(json['code']==1){
					settime();
					//$("#sendcode88").html("已发送,请注意查收");
					return false;
				}else{
					alert(json['msg']);
					$("#sendcode88").attr("disabled",false);
					return false;
				}
			}
		});
	}else{
		alert("请输入手机号码");
		$("#sendcode88").attr("disabled",false);
		return false;
	}
	
}
</script>

<link href="__STATIC__/wap/app.css" rel="stylesheet" type="text/css">
<div id="weixin" style="display: none">
    <div class="click_opacity"></div>
    <div class="to_btn">
        <span class="span1"><img src="__STATIC__/wap/click_btn.png"></span>
        <span class="span2"><em>1</em> 点击右上角<img src="__STATIC__/wap/menu.png">打开菜单</span>
        <span class="span2"><em>2</em> 选择<img src="__STATIC__/wap/safari.png">用Safari打开下载</span>
    </div>
</div>
<div id="weixin_an" style="display: none">
    <div class="click_opacity"></div>
    <div class="to_btn">
        <span class="span1"><img src="__STATIC__/wap/click_btn.png"></span>
        <span class="span2"><em>1</em> 点击右上角<img src="__STATIC__/wap/menu_android.png">打开菜单</span>
        <span class="span2 android_open"><em>2</em> 选择<img src="__STATIC__/wap/android.png"></span>
    </div>
</div>
<script src="__STATIC__/wap/slick.min.js"></script>
<script src="__STATIC__/wap/waypoints.min.js"></script>
<script src="__STATIC__/wap/jquery.themepunch.revolution.min.js"></script>
    <script>



        $(function(){
            var browser = {
                versions: function() {
                    var u = navigator.userAgent, app = navigator.appVersion;
                    return {
                        trident: u.indexOf('Trident') > -1,
                        presto: u.indexOf('Presto') > -1,
                        webKit: u.indexOf('AppleWebKit') > -1,
                        gecko: u.indexOf('Gecko') > -1 && u.indexOf('KHTML') == -1,
                        mobile: !!u.match(/AppleWebKit.*Mobile.*/) || !!u.match(/AppleWebKit/),
                        ios: !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/),
                        android: u.indexOf('Android') > -1 || u.indexOf('Linux') > -1,
                        iPhone: u.indexOf('iPhone') > -1 || u.indexOf('Mac') > -1,
                        iPad: u.indexOf('iPad') > -1,
                        webApp: u.indexOf('Safari') == -1
                    };
                }()
            }
            if(is_weixin())
            {
                if(browser.versions.ios || browser.versions.iPhone || browser.versions.iPad){
                    $('#weixin').show();
                }else{
                    $('#weixin_an').show();
                }
            }
            var os_type =  2;
            if(browser.versions.ios || browser.versions.iPhone || browser.versions.iPad){
                if(os_type == 2){
                    $('#down2').show();
                }else{
                    $('#down2').hide();
                    $('#down_tip').show().html('请使用安卓设备安装');
                }
            }else if(browser.versions.android){
                if(os_type == 1){
                    $('#down2').show();
                }else{
                    $('#down2').hide();
                    $('#down_tip').show().html('请使用IOS设备安装');
                }
            }
        })
        function ajaxTj()
        {
            var browser = {
                versions: function() {
                    var u = navigator.userAgent, app = navigator.appVersion;
                    return {
                        trident: u.indexOf('Trident') > -1,
                        presto: u.indexOf('Presto') > -1,
                        webKit: u.indexOf('AppleWebKit') > -1,
                        gecko: u.indexOf('Gecko') > -1 && u.indexOf('KHTML') == -1,
                        mobile: !!u.match(/AppleWebKit.*Mobile.*/) || !!u.match(/AppleWebKit/),
                        ios: !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/),
                        android: u.indexOf('Android') > -1 || u.indexOf('Linux') > -1,
                        iPhone: u.indexOf('iPhone') > -1 || u.indexOf('Mac') > -1,
                        iPad: u.indexOf('iPad') > -1,
                        webApp: u.indexOf('Safari') == -1
                    };
                }()
            }

            var tip_val = $('#ios_tips').val();
            if(tip_val ==1){
                $('.pos_all').css('display','block');
                $('#pos_inherit').addClass('pos_inherit');

            }
            if(!is_weixin())
            {
                                if(browser.versions.ios || browser.versions.iPhone || browser.versions.iPad){
                    $("#down2").hide();
                    $("#down_loading").show().delay(5000).fadeOut(100);
                    $("#install_tips").hide().delay(5000).fadeIn(200);
                }
                            }

            $.ajax({
                type: "GET",
                url:'/app/tj',
                data: {package_key:'98d0f7fc5457ddb0777534f47adb9119'},
                success: function(msg){
                    //console.log(msg);
                    if(msg == 1)
                    {
                        $('#down1').attr('href','#');
                        $("#down1").attr("target", "");
                        $('#down2').attr('href','');
                        $("#down2").attr("target", "#");
                    }
                }
            });
        }
        function is_weixin(){
            var ua = navigator.userAgent.toLowerCase();
            if(ua.match(/MicroMessenger/i)=="micromessenger") {
                return true;
            } else {
                return false;
            }
        }

        $(function() {
            $('.close_ios9').click(function(){
                $('.pos_all').css('display','none');
                $('#pos_inherit').removeClass('pos_inherit');
            });

            $("#btnFk").on("click", function() {
                $('#btncontact').css('display', 'block');
                $('#btnFk').css('display', 'none');
                $("#feedback_content_box").slideDown(600);
                $("#feedback_content_box").animate({top: 0}, 600);
                $("#feedback_content_box").focus();
            });



            $("#submit").on("click", function() {
                var contact = $('#btncontact').val().trim();
                var content = $('textarea').val().trim();
                var app_key = "3c4f68eaf91d14a5b16a9129f0ffba0f";
                var app_name = "定转爆粉";
                var url = '/feedback/add';

                if(!content || content == '反馈内容'){

                    $("#content_tips").css({display:'block'});
                    return false;
                }

                $('#toggle').css('display', 'none');
                $('#content_tips').css('display', 'none');
                $("#feedback_content_box").slideUp(600);
                $("#feedback_content_box").animate({ top: 20 }, 600);


                if( !contact || contact == 'Email/QQ/微信/电话' ){
                    contact = '匿名';
                }

                $.post(url,{contact:contact,content:content,app_key:app_key,app_name:app_name},function(msg){
                    if(msg){
                        $('#for_tips,textarea,#btnFk,#submit').css({display:'none'})
                    }else{
                        $('.feedback_tip').text('提交失败，请 <a href="/site/contact">吐槽</a>');
                    }
                    $('.feedback_tip').css({display:'block'})
                },'json')
            });
        })
    </script>




<div class="modal fade" id="reportApp" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
				<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                <h4 class="modal-title">举报该应用</h4>
            </div>
                 <form id="formReport" class="sky-form" name="formReport" method="POST" novalidate="novalidate"  enctype="multipart/form-data" action="{:U('Login/jubao_act')}">
				 <input type="hidden" name="appid" value="{$list.id}">
                    <div class="modal-body" style="background:#f2f2f2">
                        <section>
                        <div style="padding:0 15px 20px 15px; margin-bottom:30px; border-bottom: 1px solid #ccc;">
                            作为一个第三方内测分发平台，我们一直致力于打击违规应用，保护知识产权。非常感谢您的举报，我们会在第一时间安排专人处理您举报的问题，并在处理之后向您反馈处理结果。<br />感谢您对我们的支持。       </div>
                        <section>
                        <section style="overflow: hidden;">
                            <div class="col-md-2" style="padding-top:6px;">
                                你的邮箱                            </div>
                            <div class="col-md-10">
                                <input class="form-control" name="arEmail" style="height:34px" type="text" id="arEmail" placeholder="Email" />
                            </div>
                        </section>
                        <section style="overflow: hidden;">
                            <div class="col-md-2"  style="padding-top:2px;">
                                举报原因                            </div>
                            <div class="col-md-10">
                            <div class="row">
                            <div class="col-md-3">
                                <label class="radio-inline">
                                    <input type="radio" name="arType" checked="checked" value="盗版"> 盗版                                </label>
                            </div>
                            <div class="col-md-3">
                                <label class="radio-inline">
                                    <input type="radio" name="arType"  value="色情"> 色情                                </label>
                            </div>
                            <div class="col-md-3">
                                <label class="radio-inline">
                                    <input type="radio" name="arType"  value="欺诈"> 欺诈                                </label>
                            </div>
                            <div class="col-md-3">
                                <label class="radio-inline">
                                    <input type="radio" name="arType"  value="其他"> 其他                                </label>
                            </div>
                            </div>
                            </div>
                        </section>
                        <section style="overflow: hidden;">
                            <div class="col-md-12">
                                <textarea class="form-control" rows="5" name="arContent" id="arContent" placeholder="补充举报原因，为了让您的举报能够尽快被处理，请尽可能提供详细的信息。"></textarea> 
                            </div>
                        </section>
                        <section id="fileList">
                        
                        </section>
                        <section style="padding-bottom:20px;">
                            <div class="col-md-12">
                            <!-- <a href="javascript:void(0);" id="uploader-files" class="btn btn-danger btn-xs" style="color:#fff !important; background:#56bc94 !important; border:0px !important; margin-top:-3px">上传附件</a> -->
                            <!-- <span id="loading"><img src="/static/images/spin.gif" style="width:20px;height:auto;"></span> -->
                            </div>
                        </section>
                    </div>
                    <div class="modal-footer" style="margin-top:0px">
                        <input type="hidden" name="shortcutUrl" value="uqCy" />
                        <a data-dismiss="modal" href="javascript:void(0)" class="btn btn-u btn-u btn-u-default" id="cancle">取消</a>
                        <button type="submit" id="btnReport" class="btn btn-u btn-sm">举报该应用</button>
                    </div>
                </form>
        </div>
    </div>
</div>
<if condition="$meminfo.isvip neq 0">
    <include file="Public/qt_footer" />
<else />
    <include file="Public/ggfooter" />
</if>
